
<?= $this->load->view('tp-admin/func/message') ?>
<!-- start id-form -->
<?= form_open_multipart() ?>


<table border="0" cellpadding="0" cellspacing="0" id="id-form" style="text-align: left" >
    <tbody>
        <tr>
            <th valign="top"><label>Tên linh kiện:</label></th>
            <td><input type="text" name="accessory_name" class="inp-form"/></td>
            <td> <?= form_error('accessory_name'); ?></td>
        </tr>
        <tr>
            <th valign="top"><label>Danh mục linh kiện:</label></th>
            <td>
                <select name="accessory_category" style="height: 30px; width:200px; text-transform: uppercase" >
                    <?php foreach ($categories as $row):
                        ?>
                        <option value="<?= $row->category_id ?>" ><?= $row->category_name ?></option>
                        <?php
                    endforeach;
                    ?>

                </select>
                &nbsp;&nbsp;    <?= anchor_popup(HOME_PAGE.ADMIN_PAGE.'admin_accessory_category/add_category','Thêm danh mục') ?>
            </td>
            <td> </td>
        </tr>
        <tr>
            <th valign="top"><label>Giá linh kiện</label></th>
            <td><input type="text" name="accessory_price" class="inp-form"></td>
            <td><?= form_error('accessory_price'); ?>
            </td>
        </tr>
        <tr>
            <th valign="top"><label>Quốc gia</label></th>
            <td><input type="text" name="accessory_national" class="inp-form"></td>
            <td><?= form_error('accessory_national'); ?>
            </td>
        </tr>
        <tr>
            <th valign="top"><label>Thời gian bảo hành:</label></th>
            <td><input type="text" name="accessory_guarantee" class="inp-form"></td>
            <td><?= form_error('accessory_guarantee'); ?>
            </td>
        </tr>
        <tr>
            <th valign="top"><label>Hỗ trợ:</label></th>
            <td>
                <textarea name="accessory_support">

                </textarea>
            </td>
            <td><?= form_error('accessory_support'); ?>
            </td>
        </tr>

     
        <tr>
            <th valign="top"><label>Chi tiết</label></th>
            <td ><?= $this->load->view('tp-admin/func/accessory-detail-editor') ?>
            </td>
            <td>
               
            </td>
        </tr>
        <tr>
            <th valign="top"><label>Ảnh đại diện</label></th>
            <td >
                <input type="file" name="userfile"/>
            </td>
            <td>
                
            </td>
        </tr>

        <tr>
            <th>&nbsp;</th>
            <td valign="top">
                <input type="submit"  value="Thêm"  name="submit" class="form-submit"/>
                <input type="reset" value="Xóa trắng" class="form-reset"/>
            </td>
            <td></td>
        </tr>
    </tbody></table>

<!-- end id-form  -->
</form>